//
// Created by lenovo on 2024/7/24.
//

#ifndef BITREELIB_TREE_ITREE_H
#define BITREELIB_TREE_ITREE_H
#include "./__multitree__.h"
namespace TREE{
    template <typename T>
    class iTree{
    public:
        virtual Node<T>* root () = 0 ;

        template <typename _Visit>
        bool preOrder (_Visit&& __visit){
            return PreOrder(root() , __visit);
        }

        template <typename _Visit>
        bool postOrder (_Visit&& __visit){
            return PostOrder(root() , __visit);
        }

        template <typename _Visit>
        bool levelOrder (_Visit&& __visit){
            return LevelOrder(root() , __visit);
        }
    };
}
#endif //BITREELIB_TREE_ITREE_H
